package com.contract.spirit.ui.system

import android.content.Context
import android.content.Intent
import com.contract.commonlib.util.ext.setOnSingleClickListener
import com.contract.commonlib.base.BaseActivity
import com.contract.commonlib.util.ToolUtils
import com.contract.commonlib.util.ext.showToast
import com.contract.spirit.R
import com.contract.spirit.databinding.ActivityCustomServiceBinding
import com.contract.spirit.manage.CommonConfigManager
import com.contract.spirit.ui.UserViewModel

/**
 * @author: witness
 * created: 2021/9/29
 * desc:
 */
class CustomServiceActivity : BaseActivity<ActivityCustomServiceBinding,UserViewModel>() {
    override fun setContentView(): Int {
        return R.layout.activity_custom_service
    }

    override fun initData() {
        mBinding.configInfo = CommonConfigManager.configInfoResponse;
        mBinding.tvCopy.setOnSingleClickListener {
            ToolUtils.copyToClip(mContext, CommonConfigManager.configInfoResponse.serviceWechat)
            showToast("复制成功")
        }
    }
    companion object {
        fun launch(mContext: Context) {
            mContext.startActivity(Intent(mContext, CustomServiceActivity::class.java))
        }
    }
}